   /*-----------------------------------------------------------.
  /                       Description                           /
  '------------------------------------------------------------/

MasterEffect 1.6 Shader Suite by Marty McFly. 
Several shaders belong to different persons,for comprehensive credits see the Credits.txt file.

MAKE SURE TO ENABLE ONLY ONE DEPTH OF FIELD SHADER, DOING OTHERWISE WILL BREAK THE SHADER!

   /*-----------------------------------------------------------.
  /                      Choose effects                         /
  '-----------------------------------------------------------*/

#define USE_PETKAGTADOF 	0	//[0 or 1] PetkaGtA DOF: Enables PetkaGtA's Depth of Field, originally of Blender. NEEDS ALTERNATIVEDEPTH = 0 in enbseries.ini!! Enable only one DOF version!!
#define USE_MATSODOF 		0	//[0 or 1] Matso DOF: Enables Matso's Depth of Field. NEEDS ALTERNATIVEDEPTH = 1 in enbseries.ini!!
#define USE_GP65CJ042DOF	0	//[0 or 1] gp65cj042 DOF: Enables Depth of Field shader, this version is originally by user gp65cj042, ME uses an optimized version by the Marty McFly. NEEDS ALTERNATIVEDEPTH = 1 in enbseries.ini!!
#define USE_SPLITSCREEN		0	//[0 or 1] Splitscreen: Disables all effects on the right half of the screen to show changes.
#define USE_EXPLOSION     	0 	//[0 or 1] Explosion : Scatters the pixels, making the image look fuzzy.
#define USE_CARTOON       	0 	//[0 or 1] Cartoon : "Toon"s the image. 
#define USE_SHARPENING		1	//[0 or 1] Sharpen: Sharps the image but may increase aliasing
#define USE_LEVELS        	0 	//[0 or 1] Levels : Sets a new black and white point. This increases contrast but causes clipping. Use Curves instead if you want to avoid that.
#define USE_TECHNICOLOR   	0 	//[0 or 1] Technicolor : Attempts to mimic the look of an old movie using the Technicolor three-strip color process (Techicolor Process 4)
#define USE_DPX           	0 	//[0 or 1] Cineon DPX : Should make the image look like it's been converted to DXP Cineon - basically it's another movie-like look similar to technicolor.
#define USE_MONOCHROME    	0 	//[0 or 1] Monochrome : Monochrome makes the colors disappear. No control values.
#define USE_LIFTGAMMAGAIN 	0 	//[0 or 1] Lift Gamma Gain : Adjust brightness and color of shadows, midtones and highlights.
#define USE_TONEMAP       	0 	//[0 or 1] Tonemap : Adjust gamma, exposure, saturation, bleach and defog. (may cause clipping).
#define USE_VIBRANCE      	1 	//[0 or 1] Vibrance : Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation.
#define USE_CURVES        	0 	//[0 or 1] Curves : Contrast adjustments using S-curves.
#define USE_SEPIA         	0 	//[0 or 1] Sepia : Sepia tones the image.
#define USE_SKYRIMTONEMAP	0	//[0 or 1] Skyrim Tonemap: Applies color correction/tonemapping based on tonemappers of popular Skyrim ENB's.
#define USE_COLORMOOD   	0       //[0 or 1] Color Mood: Applies a "mood" to the color, tinting mainly the dark colors.
#define USE_CROSSPROCESS 	0       //[0 or 1] Cross Processing: Simulates wrong chemistry in color processing.
#define USE_FILMICPASS 		0	//[0 or 1] Filmic Pass: Applies some common color adjustments to mimic a more cinema-like look.
#define USE_REINHARD  		0	//[0 or 1] Reinhard: This is the Reinhard tonemapping shader, if you are interested, google how it works.
#define USE_REINHARDLINEAR	0	//[0 or 1] Reinhard: Reinhard mixed with some linear tonemapping.
#define USE_COLORMOD		0	//[0 or 1] Colormod: Contrast, Saturation and Brightness ported from colormod.asi.
#define USE_SPHERICALTONEMAP	0	//[0 or 1] Spherical Tonemap: Another approach on tonemapping, uses some sphere algorithms.
#define USE_HPD  		0	//[0 or 1] Haarm Peter Duiker Filmic Tonemapping: Tonemapping used in Watch Dogs, ripped from the Watch Dogs shaders themselves.
#define USE_FILMICCURVE		0	//[0 or 1] Filmic Curve: Improved version of the well-known Uncharted 2 filmic curve, first seen in iCEnhancer 1.3.
#define USE_SINCITY		0	//[0 or 1] Sin City: Effect from the movie "Sin City" - everything else than red is grey.
#define USE_GODRAYS		0	//[0 or 1] Godrays: Adds some light rays rotating around screen center.
#define USE_ANAMFLARE		0	//[0 or 1] Anamorphic Lensflare: adds some horizontal light flare, simulating the use of an anamorphic lens while recording.
#define USE_CHROMATICABBERATION	0	//[0 or 1] Chromatic Abberation & Lens Distord: Adds some RGB shift in colors and distorts image to look like the "fisheye" effect.
#define USE_LENZFLARE 		0	//[0 or 1] Lenz Flare: Boris Vorontsov's Skyrim Lensflare with custom offsets, ported to MasterEffect.
#define USE_GRAIN		0	//[0 or 1] Grain: Adds some image grain, looks like when a TV has no signal.
#define USE_HD6_VIGNETTE	1	//[0 or 1] HeliosDoubleSix Vignette: Adds some advanced vignette (darkening shader) to lead focus to screen center
#define USE_BORISVIGNETTE	1	//[0 or 1] Boris Vorontsov Vignette: Simple colorable version of vignette, darkens/tints the image at the corners
#define USE_BORDER		1	//[0 or 1] Adds a 1 pixel black border around the screen to compensate white outlining caused by excessive sharpening
#define USE_MOVIEBARS 		0	//[0 or 1] Movie Bars: blackens the image on the top and bottom, simulating a higher aspect ratio. Default set to 21:9 aspect ratio.
#define USE_LEIFX 		0	//[0 or 1] LeifFX: Simulates use of old 3dfx render engines, read here for more info: http://leileilol.mancubus.net/shaders/
#define USE_BLOOM 		0	//[0 or 1] Bloom: Makes bright lights bleed their light into their surroundings. NOT the crappy SweetFX implementation, this is moar fancy shiat
#define USE_COLORHUEFX		0	//[0 or 1] Color Hue FX: Desaturates everything but colors from a fixed hue mid and the range around it. Similiar to Sin City but much better. Thanks, prod80!

   /*-----------------------------------------------------------.
  /               PetkaGtA Depth of Field settings              /
  '-----------------------------------------------------------*/

#define DOF_VIGNETTING		1		//[0 or 1] Enables vignetting (darkens edges). There is a better shader for that in ME but I decided to keep it
#define DOF_MANUAL 		0		//[0 or 1] Enables Manual DOF focussing
#define DOF_AUTO 		1		//[0 or 1] Enables Autofocus
#define DOF_PENTAGONSHAPE 	0		//[0 or 1] Enables Pentagonal DOF shape (bugged, dunno how to fix, better use GP DOF for polygonal shapes)
#define focalDepth   		90.5 		//[10.0 to X] Depth of focal plane for manual DOF
#define focalLength   		80.5 		//[10.0 to X] Length of focus area for manual DOF
#define fstop   		90.5 		//[10.0 to X] fStop for manual DOF
#define vignint   		4  		//[0 to X] Amount if vignetting applied
#define ndofstart   		0.002  		//[0.0001 to 0.02] Distance where near blur starts
#define ndofdist   		0.04  		//[0.0001 to 0.02] Distance where near blur ends
#define fdofstart   		0.001  		//[0.0001 to 0.05] Distance where far blur starts
#define fdofdist   		0.7  		//[0.1 to 1.0] Distance where far blur ends
#define focus   		float2(0.5,0.5) //[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
#define CoC   			0.100 		//[0.01 to 0.3] table is here http://en.wikipedia.org/wiki/Circle_of_confusion
#define namount   		0.00004 	//[0.00000 to 0.0005] Amount of noise applied. This is no grain, rather some kind of DOF offset jittering
#define DOFdownsample   	4.0 		//[0 to 10] This should downsample the blurred areas but Boris and his unsupported stuff...
#define maxblur   		2.5 		//[1.0 to 10.0] Maximum amount of blurring
#define samples   		6  		//[5 to 30] Samples on the first ring. The other rings around have more samples
#define rings   		2  		//[1 to 8] Ring count
#define threshold   		2.5 		//[0.8 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define gain   			0.1 		//[0.1 to 2.0] Amount of brightening for pixels brighter than threshold.
#define bias   			0.1 		//[0.1 to 2.0] bokeh bias.
#define fringe   		0.5 		//[0.0 to 1.0] Amount of chromatic abberation
#define znear   		100.0  		//[20 to 200] camera clipping start.
#define zfar   			300.0  	//[1500 to 8000] camera clipping end.
#define feather   		1.1  		//[0.1 to 2.0] pentagon shape feather.

   /*-----------------------------------------------------------.
  /                Matso's Depth of Field settings              /
  '-----------------------------------------------------------*/

#define USE_CHROMA_DOF		1		//[0 or 1] Enables Chromatic Abberation.		
#define USE_SMOOTH_DOF		1		//[0 or 1] Enables smoother DOF	
#define USE_BOKEH_DOF		1		//[0 or 1] Enables Bokeh DOF. Disabling it screws the shape up, leave it on
#define USE_AUTOFOCUS		1		//[0 or 1] Enables Autofocus	
#define CHROMA_POW		65.0		//[10 to 100] Controls amount of chromatic abberation		
#define DOF_SCALE		2356.1944901923449288469825374596 //LEAVE IT	
#define FIRST_PASS		2		//LEAVE IT		
#define SECOND_PASS		3		//LEAVE IT	
#define THIRD_PASS		0		//LEAVE IT	
#define FOURTH_PASS		1		//LEAVE IT	
#define DOF(sd,sf)		fApertureScale * smoothstep(fApertureBias, fApertureCutoff, abs(sd - sf)) //LEAVE IT
#define fvChroma		float3(0.995, 1.000, 1.005) //Displacement of colors for chromatic abberation. 1.0 is original position
#define fBaseRadius		0.9		
#define fFalloffRadius		1.8
#define fChromaPower		1.0
#define fvTexelSize		float2(1.0 / 1920.0, 1.0 / 1080.0)
#define fFocusBias		0.045
#define fApertureScale		0.004
#define fApertureCutoff		0.25
#define fApertureBias		0.07
#define fBokehCurve		8.0
#define fBokehLight		0.012

   /*-----------------------------------------------------------.
  /            gp65cj042's Depth of Field settings              /
  '-----------------------------------------------------------*/

#define	NOT_BLURRING_SKY_MODE 	0		//[0 or 1] Prevents the DOF of blurring the sky. Probably doesn't work on 0.076 due to SA's stupid depth calculation	
#define	DEPTH_OF_FIELD_QULITY 	5		//[0 to 7] 0: only slight gaussian farblur but no bokeh. 1-7 bokeh blur, higher means better quality of blur but less fps. 
#define	AUTO_FOCUS 		0		//[0 or 1] Enables automatic focal plane detection, for focussing FocusPoint is used.
#define TILT_SHIFT 		0		//[0 or 1] Enables Tilt shifting. Google it!
#define POLYGONAL_BOKEH 	1		//[0 or 1] Enables polygonal bokeh shape, e.g. POLYGON_NUM 5 means pentagonal bokeh shape. Setting this value to 0 results in circular bokeh shape.
#define	POLYGON_NUM 		5		//[3 to 9] Controls the amount pf polygons for polygonal bokeh shape. 3 = triangular, 4 = square, 5 = pentagonal etc.	
#define	FocusPoint 		float2(0.5, 0.5); //[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
#define	FocusSampleRange	1.00		//[0.0 to 10.0] Autofocus samples 4 additional points around FocusPoint and averages focal plane. This value controls search radius of these 4 points.	
#define	NearBlurCurve 		1.00		//[0.0 to X] Blur curve of objects closer to camera than focal plane. Raise for less blur. Set to insane values for no blur.
#define	FarBlurCurve 		1.00		//[0.0 to X] Blur curve of objects beyond focal plane. Raise for less blur. Set to insane values for no blur.
#define	DepthClip 		150.0		//[10.0 to 1000.0] After this distance depth if max, no matter how far something really is.
#define ManualFocusDepth 	100.0		//[0.0 to 1000.0] Manual focus distance rougly in meters. Active only when AUTO_FOCUS 0.
#define	TiltShiftAngle 		30.0		//[0.0 to 360.0] Angle of autofocus. I highly recommend to google that effect if you wanna know what it does.
#define	BokehBias 		10.00		//[0.0 to 20.0] Shifts bokeh weighting to bokeh shape edge. Set to 0 for even bright bokeh shapes, raise it for darker bokeh shapes in center and brighter on edge.
#define	BokehBiasCurve 		1.50		//[0.0 to 3.0] Power of Bokeh Bias. Raise for more defined bokeh outlining on bokeh shape edge.
#define	BokehBrightnessThreshold 	1.00	//[0.6 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define	BokehBrightnessMultipiler 	0.00	//[0.0 to 2.0] Amount of brightening for pixels brighter than BokehBrightnessThreshold.
#define	RadiusSacleMultipiler 	5.00		//[0.5 to 10.0] Overall blur multiplier, higher results in more blur. Do not set too high, otherwise the single taps will be visible. If that happens, raise quality.
#define BokehPostBlur		0.50		//[0.5 to 3.0] Radius in pixels for post gaussian blur after bokeh blur to smoothen shape. 
#define	NoiseAmount 		0.00		//[0.05 to 0.8] Amount of noise applied on bokeh blur areas.
#define	NoiseCurve 		0.00		//[0.05 to 0.8] Curve of noise applied on bokeh blur areas.
#define	ChromaticAberrationAmount 	0.00	//[0.00 to 0.4] Amount of color shifting applied on blurred areas. 

   /*-----------------------------------------------------------.
  /                     Explosion settings                      /
  '-----------------------------------------------------------*/

#define Explosion_Radius    	10.5    	//[0.2 to 100.0] Amount of effect you want.

   /*-----------------------------------------------------------.
  /                      Cartoon settings                       /
  '-----------------------------------------------------------*/

#define CartoonPower         	0.5     	//[0.1 to 10.0] Amount of effect you want.
#define CartoonEdgeSlope     	1.0     	//[0.1 to 8.0] Raise this to filter out fainter edges. You might need to increase the power to compensate. Whole numbers are faster.

   /*-----------------------------------------------------------.
  /                      Sharpen settings                       /
  '-----------------------------------------------------------*/

#define SharpBias  	     	0.35		//[0.05 to 1.0] How big the sharpen offset is (used to compare neighbor pixels to get sharpen amount
#define SharpStrength 		0.5		//[0.05 to 1.0] Amount of sharpening you want.
#define SharpClamp 		0.3		//[0.2 to 2.0] Clamps the sharpening to a maximum amount to prevent aliasing

   /*----------------------------------------------------------.
  /                       Levels settings                      /
  '----------------------------------------------------------*/

#define Levels_black_point 	36    		//[0 to 255] The black point is the new black - literally. Everything darker than this will become completely black. Default is 16.0
#define Levels_white_point 	235   		//[0 to 255] The new white point. Everything brighter than this becomes completely white. Default is 235.0

   /*-----------------------------------------------------------.
  /                      TECHNICOLOR settings                   /
  '-----------------------------------------------------------*/

#define TechniAmount 		0.4     	//[0.00 to 1.00] Amount of color change you want
#define TechniPower  		4.0     	//[0.00 to 8.00] Power of color change
#define redNegativeAmount   	0.88 		//[0.00 to 1.00] controls for different technicolor power on the respective color channels
#define greenNegativeAmount 	0.88    	//[0.00 to 1.00]
#define blueNegativeAmount  	0.88    	//[0.00 to 1.00]

   /*-----------------------------------------------------------.
  /                      Cineon DPX settings                    /
  '-----------------------------------------------------------*/

#define DPXRed   		8.0  		//[1.0 to 15.0] Amount of DPX applies on Red color channel
#define DPXGreen 		8.0  		//[1.0 to 15.0] ""
#define DPXBlue  		8.0  		//[1.0 to 15.0] ""
#define DPXColorGamma    	2.5  		//[0.1 to 2.5] Adjusts the colorfulness of the effect in a manner similar to Vibrance. 1.0 is neutral.
#define DPXSaturation 		3.0  		//[0.0 to 8.0] Adjust saturation of the effect. 1.0 is neutral.
#define DPXRedC   		0.36  		//[0.60 to 0.20] 
#define DPXGreenC 		0.36  		//[0.60 to 0.20]
#define DPXBlueC  		0.34  		//[0.60 to 0.20]
#define DPXBlend 		0.2    		//[0.00 to 1.00] How strong the effect should be.

   /*-----------------------------------------------------------.
  /                    Lift Gamma Gain settings                 /
  '-----------------------------------------------------------*/

#define RGB_Lift  		float3(1.000, 1.000, 1.000)  //[0.000 to 2.000] Adjust shadows for Red, Green and Blue.
#define RGB_Gamma 		float3(1.000, 2.000, 1.000)  //[0.000 to 2.000] Adjust midtones for Red, Green and Blue
#define RGB_Gain  		float3(1.000, 1.000, 1.000)  //[0.000 to 2.000] Adjust highlights for Red, Green and Blue

   /*-----------------------------------------------------------.
  /                        Tonemap settings                     /
  '-----------------------------------------------------------*/

#define Gamma       		1.000  		//[0.000 to 2.000] Adjust midtones. 1.000 is neutral. This setting does exactly the same as the one in Lift Gamma Gain, only with less control.
#define Exposure    		0.000  		//[-1.000 to 1.000] Adjust exposure
#define Saturation  		0.000  		//[-1.000 to 1.000] Adjust saturation
#define Bleach      		0.000  		//[0.000 to 1.000] Brightens the shadows and fades the colors
#define Defog       		0.000  		//[0.000 to 1.000] How much of the color tint to remove
#define FogColor 		float3(0.00, 0.00, 2.55) //[0.00 to 2.55, 0.00 to 2.55, 0.00 to 2.55] What color to remove - default is blue

   /*-----------------------------------------------------------.
  /                       Vibrance settings                     /
  '-----------------------------------------------------------*/

#define Vibrance     		0.5  		//[-1.00 to 1.00] Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation.
#define Vibrance_RGB_balance 	float3(1.00, 1.00, 1.00) //[-10.00 to 10.00,-10.00 to 10.00,-10.00 to 10.00] A per channel multiplier to the Vibrance strength so you can give more boost to certain colors over others

   /*-----------------------------------------------------------.
  /                        Curves settings                      /
  '-----------------------------------------------------------*/

#define Curves_mode        	2 		//[0|1|2] Choose what to apply contrast to. 0 = Luma, 1 = Chroma, 2 = both Luma and Chroma. Default is 0 (Luma)
#define Curves_contrast 	1.15 		//[-1.00 to 1.00] The amount of contrast you want

// -- Advanced curve settings --
#define Curves_formula     	2 		//[1|2|3|4|5|6|7|8|9|10] The contrast s-curve you want to use.
                             			//1 = Sine, 2 = Abs split, 3 = Smoothstep, 4 = Exp formula, 5 = Simplified Catmull-Rom (0,0,1,1), 6 = Perlins Smootherstep
                             			//7 = Abs add, 8 = Techicolor Cinestyle, 9 = Parabola, 10 = Half-circles.
                             			//Note that Technicolor Cinestyle is practically identical to Sine, but runs slower. In fact I think the difference might only be due to rounding errors.
                             			//I prefer 2 myself, but 3 is a nice alternative with a little more effect (but harsher on the highlight and shadows) and it's the fastest formula.
		
   /*-----------------------------------------------------------.
  /                         Sepia settings                      /
  '-----------------------------------------------------------*/

#define ColorTone 		float3(1.40, 1.10, 0.90) //[0.00 to 2.55, 0.00 to 2.55, 0.00 to 2.55] What color to tint the image
#define GreyPower  		0.11                     //[0.00 to 1.00] How much desaturate the image before tinting it
#define SepiaPower 		0.58                     //[0.00 to 1.00] How much to tint the image

   /*-----------------------------------------------------------.
  /                     Skyrim Tonemap settings                 /
  '-----------------------------------------------------------*/

#define POSTPROCESS			1 	//[1 to 6] Mode of postprocessing you want. Mode 1 uses V1 values, Mode 2 uses V2 values etc
//
#define	EAdaptationMinV1   		0.05 
#define	EAdaptationMaxV1   		0.125 
#define	EContrastV1   			0.0 
#define	EColorSaturationV1   		1.0 
#define	EToneMappingCurveV1   		1.0 
//	
#define	EAdaptationMinV2 		0.36 
#define	EAdaptationMaxV2 		0.29 
#define	EToneMappingCurveV2 		8.0 
#define	EIntensityContrastV2 		2.5 
#define	EColorSaturationV2		3.2 
#define	EToneMappingOversaturationV2 	180.0 
//
#define	EAdaptationMinV3   		0.001 
#define	EAdaptationMaxV3   		0.025 
#define	EToneMappingCurveV3   		30.0  
#define	EToneMappingOversaturationV3    111160.0 
//
#define	EAdaptationMinV4   		0.2 
#define	EAdaptationMaxV4  		0.125 
#define	EBrightnessCurveV4  		0.7 
#define	EBrightnessMultiplierV4  	0.45 
#define	EBrightnessToneMappingCurveV4   0.3 
//
#define	EAdaptationMinV5   		0.08 
#define	EAdaptationMaxV5   		0.20  
#define	EToneMappingCurveV5   		8  
#define	EIntensityContrastV5   		3.475  
#define	EColorSaturationV5   		4 
#define HCompensateSatV5   		2  
#define	EToneMappingOversaturationV5    180.0 
//
#define	EBrightnessV6Day   		2.5 							
#define EIntensityContrastV6Day   	1.5 					
#define	EColorSaturationV6Day  	 	2.0  					
#define HCompensateSatV6Day   		3.0 						
#define	EAdaptationMinV6Day   		0.64 						
#define	EAdaptationMaxV6Day   		0.24 						
#define	EToneMappingCurveV6Day  	8 
#define	EToneMappingOversaturationV6Day  2500.0 

   /*-----------------------------------------------------------.
  /                     Color Mood settings                     /
  '-----------------------------------------------------------*/

#define fRatio				2.0 	//[0.00 to 3.00] Amount of moody coloring you want
#define moodR				1.0 	//[0.0 to 2.0] How strong dark red colors shall be boosted
#define moodG				1.1 	//[0.0 to 2.0] How strong dark green colors shall be boosted
#define moodB				0.5 	//[0.0 to 2.0] How strong dark blue colors shall be boosted

   /*-----------------------------------------------------------.
  /                  Crossprocessing settings                   /
  '-----------------------------------------------------------*/

#define CrossContrast			0.95  	//[0.5 to 2.00] The names of these values should explain their functions
#define CrossSaturation			1.12  	//[0.5 to 2.00]
#define CrossBrightness			-0.052  //[-0.3 to 0.30]
#define CrossAmount			1.0 	//[0.05 to 1.5]

   /*-----------------------------------------------------------.
  /                Filmic Adjustments settings                  /
  '-----------------------------------------------------------*/

#define Strenght			1.0  	//[0.05 to 1.5] Strength of the color curve altering
#define BaseGamma			2.5	//[0.7 to 2.0] Gamma Curve
#define Fade				0.2	//[0.0 to 0.6] Decreases contrast to imitate faded image
#define Contrast			0.75	//[0.5 to 2.0] Contrast.
#define FSaturation			-0.15
#define FBleach				0.005 	//[-0.5 to 1.0] More bleach means more contrasted and less colorful image
#define FRedCurve			6.0 
#define FGreenCurve			6.0
#define FBlueCurve			6.0
#define BaseCurve			1.0
#define EffectGammaR			1.0
#define EffectGammaG			1.0
#define EffectGammaB			1.0
#define EffectGamma			1.0
#define Linearization			1.0  	//[0.5 to 2.0] Linearizes the color curve

   /*-----------------------------------------------------------.
  /               Reinhard Tonemapping settings                 /
  '-----------------------------------------------------------*/

#define ReinhardWhitepoint		4.0 	//[1.0 to 10.0] Point above which everything is pure white
#define ReinhardScale			0.5 	//[0.0 to 2.0] Amount of applied tonemapping

   /*-----------------------------------------------------------.
  /              Reinhard Linear Tonemap settings               /
  '-----------------------------------------------------------*/

#define ReinhardLinearWhitepoint	4.4
#define ReinhardLinearPoint		0.06
#define ReinhardLinearSlope		2.25 	//[1.0 to 5.0] how steep the color curve is at linear point. You need color curve understanding to know what this means, just experiment.

   /*-----------------------------------------------------------.
  /                    colormod.asi settings                    /
  '-----------------------------------------------------------*/

#define ColormodChroma 			 0.78  		// Saturation
#define ColormodGammaR 			 1.05  		// Gamma for Red color channel
#define ColormodGammaG 			 1.05  		// Gamma for Green color channel
#define ColormodGammaB 			 1.05  		// Gamma for Blue color channel
#define ColormodContrastR 		 0.50  		// Contrast for Red color channel
#define ColormodContrastG 		 0.50  		// ...
#define ColormodContrastB 		 0.50  		// ...
#define ColormodBrightnessR 		 -0.08  	// Brightness for Red color channel
#define ColormodBrightnessG 		 -0.08  	// ...
#define ColormodBrightnessB 		 -0.08  	// ...

   /*-----------------------------------------------------------.
  /       Spherical Tonemap (Watch Dogs shader) settings        /
  '-----------------------------------------------------------*/

#define sphericalAmount 		1.0	//[0.0 to 2.0] Amount of spherical tonemapping applied...sort of

   /*-----------------------------------------------------------.
  /                       Godrays settings                      /
  '-----------------------------------------------------------*/

#define GODRAYDEPTHCHECK		1	//[0 or 1] if 1, only pixels with depth = 1 get godrays, this prevents white objects from getting godray source which would normally happen in LDR
#define GodraySamples 			128	//[2^x format] How many samples the godrays get
#define GodrayDecay   			0.96  	//[0.5 to 0.9999] How fast they decay. It's logarithmic, 1.0 means infinite long rays which will cover whole screen
#define GodrayExposure			1.0	//[0.7 to 1.5] Upscales the godray's brightness
#define GodrayWeight			1.25	//[0.8 to 1.7] weighting
#define GodrayDensity			1.0	//[0.2 to 2.0] Density of rays, higher means more and brighter rays
#define GodrayThreshold			0.9    	//[0.6 to 1.0] Minimum brightness an object must have to cast godrays

   /*-----------------------------------------------------------.
  /                Anamorphic Lensflare settings                /
  '-----------------------------------------------------------*/

#define ANAMFLAREDEPTHCHECK		1	//[0 or 1] if 1, only pixels with depth = 1 get an anamflare, this prevents white objects from getting flare source which would normally happen in LDR
#define fFlareLuminance 		0.2	//[0.6 to 1.0] bright pass luminance value 
#define fFlareBlur 			200.0	// [1.0 to 9999999] manages the size of the flare
#define fFlareIntensity 		2.07	// [0.2 to 5.0] effect intensity
#define fFlareTint			float3(0.137, 0.216, 1.0)	// [0.0 to 2.0] effect tint RGB

   /*-----------------------------------------------------------.
  /        Chromatic Abberation/Lens Distortion settings        /
  '-----------------------------------------------------------*/

#define ChromaticAmount			0.009	//[0.005 to 0.03] Amount of color shifting
#define LensSize			0.55   	//[0.5 to 1.0] some lens zoom to hide bugged edges due to texcoord modification
#define LensDistortion	 		0.05   	//[-0.3 to 0.3] distortion of image, fish eye effect
#define LensDistortionCubic		0.05	//[-0.3 to 0.3] distortion of image, fish eye effect, cube based

   /*-----------------------------------------------------------.
  /                      Lensflare settings                     /
  '-----------------------------------------------------------*/

#define LENZDEPTHCHECK 			0    	//[0 or 1] if 1, only pixels with depth = 1 get lens flare, this prevents white objects from getting flare source which would normally happen in LDR
#define LenzIntensity 			0.4 	//[0.2 to 3.0] power of lens flare effect
#define LenzThreshold 			0.7 	//[0.6 to 1.0] Minimum brightness an object must have to cast lensflare

   /*-----------------------------------------------------------.
  /                     Image Grain settings                    /
  '-----------------------------------------------------------*/

#define fGrainMotion			0.3  	//[0.0 to 10.0] speed of noise change rate, 0.0 means static noise
#define fGrainSaturation 		0.25 	//[0.05 to 1.0] brightness and chroma difference between the single noise pixels, 0 would mean plain black image added to original image resulting in no noise at all.
#define fGrainIntensity 		0.25  	//[0.05 to 1.0] Power of noise

   /*-----------------------------------------------------------.
  /                     HD6 Vignette settings                   /
  '-----------------------------------------------------------*/

#define LEFTANDRIGHT 			0	//[0 or 1] self-explaining, I think. Keep only one of these 3 booleans enabled!!		
#define TOPANDBOTTOM 			1	//[0 or 1] self-explaining, I think. Keep only one of these 3 booleans enabled!!			
#define CORNERDARKEN 			0	//[0 or 1] self-explaining, I think. Keep only one of these 3 booleans enabled!!			
#define SquareTop			0.58
#define SquareBottom			0.58
#define CircularPower			0.0	//[0.0 to 100000.0] amount of circularism (new word invented hoho), 0 means linear vignette, 100000.0 means rougly total circle
#define ColorDistortion			0.0     //[0.0 to 5.0] distorts the colors a bit
#define ContrastSharpen			11.6
#define VignetteBorder			6.5

   /*-----------------------------------------------------------.
  /                      Vignette settings                      /
  '-----------------------------------------------------------*/

#define EVignetteAmount			2.9	//[0.0 to 5.0] self-explaining variable name
#define EVignetteCurve			1.5	//[0.0 to 5.0] self-explaining variable name
#define EVignetteRadius			0.8	//[0.0 to 5.0] self-explaining variable name
#define VIGNCOLORING			0	//[0 or 1] enables color override, RGB controls below.			
#define VIGNREDAMOUNT			0.0		
#define VIGNGREENAMOUNT			5.0		
#define VIGNBLUEAMOUNT			0.0

   /*-----------------------------------------------------------.
  /                        Bloom settings                       /
  '-----------------------------------------------------------*/

#define MIXMODE				2  	//[1 or 2] Mixmode: 1 means bloom gets added to image, 2 means bloom gets mixed with image with SAGE algorithm. Couldn't find/invent other good mixage modes.
#define fBloomThreshold 		0.5 	//[0.0 to 1.0] minimum brightness for an object to cast bloom
#define fBloomPower 			0.8 	//[0.0 to 5.0] power of bloom applied
#define fBloomSaturation 		0.5	//[0.0 to 5.0] saturation of bloom, 0.0 means white bloom
#define fBloomTint 			float3(1.0,1.0,1.0) //[0.0 to 2.0] RGB color control of bloom


   /*-----------------------------------------------------------.
  /                    Color Hue FX settings                    /
  '-----------------------------------------------------------*/

#define USE_COLORSAT 			0   	//[0 or 1] This will use original color saturation as an added limiter to the strength of the effect
#define hueMid  			0.6	//[0.0 to 1.0] Hue (rotation around the color wheel) of the color which you want to keep
#define hueRange  			0.1	//[0.0 to 1.0] Range of different hue's around the hueMid that will also kept. Using a max range of 1.0 will allow the reverse of the effect where it will only filter a specific hue to B&W
#define satLimit 			2.9	//[0.0 to 4.0] Saturation control, better keep it higher than 0 for strong colors in contrast to the gray stuff around
#define fxcolorMix 			0.8	//[0.0 to 1.0] Interpolation between the original and the effect, 0 means full original image, 1 means full grey-color image.
